<?php

namespace lite\controllers;

use Yii;
use yii\filters\AccessControl;
use yii\web\Controller;
use yii\filters\VerbFilter;
use admin\models\LoginForm;
use admin\models\ContactForm;

class SiteController extends Controller
{
    public function actionError() {
        if($_SERVER['accept']==='application/json'){
            return $this->ajaxResponseError('系统错误：'.\Yii::$app->exception,-1);
        }else{
            return $this->render('error', ['exception' => \Yii::$app->exception]);
        }
    }
}
